/*
* Conditions Of Use
*
* This software was developed by employees of the Sigmatrix(Beijing) Corporation.
* This software is provided by sigmatrix as a service and is expressly
* provided "AS IS."  Sigmatrix MAKES NO WARRANTY OF ANY KIND, EXPRESS, IMPLIED
* OR STATUTORY, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTY OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT
* AND DATA ACCURACY.  Sigmatrix does not warrant or make any representations
* regarding the use of the software or the results thereof, including but
* not limited to the correctness, accuracy, reliability or usefulness of
* the software.
*
* Permission to use this software is contingent upon your acceptance
* of the terms of this agreement.
*
*/
package com.sigmatrix.h5.dao;

import java.util.List;

import com.sigmatrix.h5.dto.DisTerminalShopData;
import com.sigmatrix.h5.entity.DisTerminalShop;
import com.sigmatrix.h5.exception.DaoException;
import com.sigmatrix.sc.jdbc.common.dao.Dao;

/**
 *@ClassName: DisTerminalShopDao
 *@Description: 终端门店
 *@author MH
 *@date 2017年8月14日 上午10:38:56
 */
public interface DisTerminalShopDao extends Dao<DisTerminalShop,Integer>{
	/**
	 * 通过编码修改状态
	 *@Title: updateStatusByCode
	 *@Description: 
	 *@return Integer
	 *@author MH
	 *@date 2017年8月22日 上午10:34:54
	 *@param code
	 *@param status
	 *@return
	 *@throws DaoException
	 */
	Integer updateStatusByCode(String code,Short status);
	
	/**
	 * 
	 *@Title: findByCodeConstantDelete
	 *@Description: 
	 *@return List<DisTerminalShop>
	 *@author MH
	 *@date 2017年9月7日 下午3:11:02
	 *@param code
	 *@return
	 *@throws DaoException
	 */
	List<DisTerminalShop> findByCodeConstantDelete(String code);
	/**
	 * 
	 *@Title: findByName
	 *@Description: 通过名称查询
	 *@return DisTerminalShop
	 *@author MH
	 *@date 2017年12月15日 下午1:07:49
	 *@param name
	 *@return
	 */
	DisTerminalShop findByName(String name);
	
	/**
	 * 
	 *@Title: findByOpenIdAndPromotion
	 *@Description: 通过openId跟推广码查询
	 *@return DisTerminalShop
	 *@author MH
	 *@date 2017年12月15日 下午1:08:02
	 *@param openId
	 *@param promotion
	 *@return
	 */
	List<DisTerminalShop> findByOpenId(String openId);
	Integer submitAgin(String code);

	DisTerminalShop findByOpenIdAndDealerId(String openId, Integer dealerId);
	/**
	 * 
	 *@Title: findByDealerId
	 *@Description:根据经销商id查询门店
	 *@return List<DisTerminalShop>
	 *@author gaomingkai
	 *@date 2018年3月12日 下午2:24:08
	 *@param dealerId
	 *@return
	 */
	List<DisTerminalShopData> findByDealerId(Integer dealerId,String enterpriseCode);
	/**
	 * 
	 *@Title: findByType
	 *@Description:查询虚拟门店  type：代表虚拟门店
	 *@return List<DisTerminalShop>
	 *@author gaomingkai
	 *@date 2018年3月12日 下午2:24:27
	 *@param type
	 *@return
	 */
	List<DisTerminalShopData> findByType(short type,String enterpriseCode);
	/**
	 * 
	 *@Title: findByCode
	 *@Description: TODO()
	 *@return List<DisTerminalShop>
	 *@author gaomingkai
	 *@date 2018年3月12日 下午4:12:54
	 *@param code
	 *@param enterpriseCode
	 *@return
	 */
	DisTerminalShopData findById(Integer id,String enterpriseCode);

}
